if else is not working in opengl langauge